import java.io.FileOutputStream;
import java.io.IOException;

public class day_05_IO_2 {
    public static void main(String[] args) throws IOException {
        //append为true则续写
        FileOutputStream fileOutputStream = new FileOutputStream("2.txt",true);

        //换行
        String wrap = "\r\n";
        byte[] wrapBytes = wrap.getBytes();
        fileOutputStream.write(wrapBytes);

        //写出数据
        String account = "Account: 266796697@qq.com";
        byte[] accountBytes = account.getBytes();
        fileOutputStream.write(accountBytes);

        //换行
        fileOutputStream.write(wrapBytes);

        //写出数据
        String str = "Password: Gikh20210307";
        byte[] bytes = str.getBytes();
        fileOutputStream.write(bytes);

        fileOutputStream.close();
    }
}
